Characterizing heterogeneity with fine-scale population structure

ABSTRACT

Described are techniques for determining population structure from identity-by-descent (IBD) of individuals. The techniques may be used to predict that an individual belongs to zero, one or more of a number of communities identified within an IBD network. Additional data may be used to annotate the communities with birth location, surname, and ethnicity information. In turn, these data may be used to provide to an individual a prediction of membership to zero, one or more communities, accompanied by a summary of the information annotated to those communities. Ethnicity heterogeneity and age information may be tabulated and provided based on community membership information.

CROSS REFERENCE TO RELATED APPLICATIONS

This application claims the benefit of priority to U.S. Provisional Application No. 62/567,454, filed on Oct. 3, 2017, which is entitled “Characterizing Heterogeneity within Fine-scale Population Structure.” This application is also a continuation-in-part of prior, co-pending U.S. application Ser. No. 15/168,011, filed on May 28, 2016, which claims the benefit of priority to U.S. Provisional Application No. 62/168,808, filed on May 30, 2015. All of the foregoing are incorporated herein by reference in their entirety for all purposes.

BACKGROUND Field

The disclosed embodiments relate to discovering historical populations from the pattern of genetic relationships between people.

Description of Related Art

Although humans are, genetically speaking, almost entirely identical, small differences in human DNA are responsible for some observed variation between individuals. In fact, by comparing these small differences in DNA of individuals, it is possible to detect long chromosome segments suggestive of inheritance from a recent common ancestor, and then use these detected segments to estimate how closely two people are related. The process of identifying segments suggestive of recent common inheritance is known in population genetics literature as an analysis of identity-by-descent (IBD). IBD analysis can be used to predict the familial relationship between any two people (e.g., second cousins) in a population as long as the relationship is due to shared common ancestors from the recent past.

Learning about population structure from genetic polymorphism data is an important topic in genetics. The most widely used methods in this area are based on modeling variation in allele frequencies. These methods have shed light, for example, on historical patterns of migration in human populations. To take one example of this, prior genetic studies of the United States (US) have helped to elucidate the diversity of recent immigrants in relation to other parts of the world (e.g. Europe, Africa). By contrast, patterns of IBD can be used to study more recent demography of known populations, such as demographic events that have occurred within the US in the period beginning with European colonization.

While researchers have previously used analysis of IBD patterns to learn about the history of different groups of people, using IBD to discover groups within heterogeneous populations such as the present-day US has not been done previously.

SUMMARY

Disclosed herein are techniques for determining population structure from identity-by-descent (IBD) of individuals. In various embodiments, the techniques disclosed herein may additionally be used for predicting assignments of individuals to populations based on obtained genetic information. In other embodiments, additional data is used to annotate the inferred populations, and characterize them with respect to known worldwide population structure and historical events.

In one embodiment, a process for determining IBD segments includes analyzing phased genetic data obtained from DNA samples of individuals. Phased genetic data from pairs of individuals in a sample are analyzed to estimate shared IBD chromosomal segments. The extent of IBD sharing between every pair can be mapped to an affinity metric.

These affinity metrics computed for every pair of DNA samples are used to generate an IBD network, in which nodes in the network represent individuals, and weighted edges in the network represent the IBD-based affinity between individuals. Application of a network clustering algorithm allows for the identification of structure from the pattern of IBD. Each cluster within an IBD network may define a group of people that share common ancestral origins or a common history. To characterize this shared history underlying each IBD network cluster, identified clusters are annotated with historical data based on information available about the individuals in each cluster. These annotations include, for example, genealogical data (e.g., surnames and birth locations of ancestors in pedigrees), estimates of ethnic background based on the DNA sample, and information obtained from user surveys.

In some embodiments, the IBD network may be used to construct data sets, referred to as reference panels, which can be used to train models. These models can in turn be used to generate a prediction regarding which clusters are relevant to a hypothetical user, such as a new user, based on a sample of their DNA.

BRIEF DESCRIPTION OF THE DRAWINGS

These and other features, aspects, and advantages of the present invention will become better understood with regard to the following description, and accompanying drawings, where:

FIG. 1 is a block diagram of an overview of a computing system for estimating IBD from genotype data, using IBD to generate an IBD network and train a model based on the IBD network, according to one embodiment.

FIG. 2 is a flow diagram for the operation of the computer system for receiving, processing and storing genetic, genealogical and survey input data associated with users of the system in accordance with an embodiment.

FIG. 3 is a flow diagram for constructing an IBD network, inferring clusters in the network, and annotating the IBD network clusters, in accordance with an embodiment.

FIG. 4 is an illustration of an example result of running a hierarchical clustering algorithm on an IBD network, in accordance with an embodiment.

FIG. 5 is a flow diagram for generating a model to predict which individuals are assigned to which clusters, in accordance with an embodiment.

FIG. 6 illustrate example distributions of ethnicity estimations for individuals associated with various communities, according to one embodiment.

FIG. 7A illustrates a plot of community age ranges for a number of communities, according to one embodiment.

FIG. 7B illustrates a plot of the mean age of community members against the percentage of children older than 18 who are associated with the same community as their parents, according to one embodiment.

FIG. 8 illustrates an example plot of ethnicity heterogeneity where ethnicity estimates have been collapsed by continent against mean age of community members, according to one embodiment.

FIGS. 9A and 9B illustration additional information about the population structure in North America, according to one embodiment.

Note that for purposes of clarity, only one of each item corresponding to a reference numeral is included in most figures, but when implemented multiple instances of any or all of the depicted modules may be employed, as will be appreciated by those of skill in the art.

DETAILED DESCRIPTION I. Environment Overview

FIG. 1 is a block diagram of an overview of a computing system for estimating IBD from genotype data, using IBD to generate an IBD network and train a model based on the IBD network, according to one embodiment. Depicted in FIG. 1 are an individual 101 (i.e. a human or other organism), a deoxyribonucleic acid (DNA) extraction service 102, and a computing system 100.

Individuals 101 provide DNA samples for analysis of their genetic data. In one embodiment, an individual uses a sample collection kit to provide a DNA sample, e.g., saliva, from which genetic data can be reliably extracted according to conventional DNA processing techniques. DNA extraction service 102 receives the sample and estimates genotypes from the genetic data, for example by extracting the DNA from the sample and identifying genotype values of single nucleotide polymorphisms (SNPs) present within the DNA. The result in this example is a diploid genotype for each SNP. Computing system 100 receives the genetic data from DNA extraction service 102 and stores the genetic data in a DNA sample store 140 containing DNA diploid genotypes. In some embodiments, the genetic data stored in the DNA sample store 140 may be associated with a user in the user data store 145 via one or more pointers.

The computing system 100 processes the DNA to identify shared IBD between pairs of individuals, and uses that information to identify clusters in a sample of individuals. In one embodiment, a cluster includes individuals in a sample that exhibit a higher density of IBD connections between each other relative to other individuals in the sample. The clusters can be annotated with information about phenotypes characteristic of individuals within the group, and used to develop models that allow assignment of, often new, individuals to those clusters.

To accomplish this, the computing system 100 comprises computer program instructions that can be logically structured to generate within the processor/s and storage media of the computing system an input data processing module 110, an IBD estimation module 115, an IBD network module 120, a model training module 125, a community (cluster) prediction module 130, a DNA sample store 140, a user data store 145, a model store 150, an IBD network store 155, and a panel store 160. In other embodiments, the computer system 100 may comprise more or fewer modules, and the logical structure may be differently organized. The data stores may be represented in different ways in different embodiments, such as comma-separated text files, or as databases such as relational databases (SQL) or non-relational databases (NoSQL).

II. Input Data Processing

To process the data stored in the DNA sample store 140 and estimate IBD from the DNA samples, the computing system 100 comprises an input data processing module 110, and an IBD estimation module 115. These modules are described in relation with FIG. 2 which is a flow diagram for the operation of the computer system 100 for estimating and storing estimated IBD in accordance with an embodiment.

II.a. DNA Sample Receipt and Account Creation

FIG. 2 is a flow diagram for the operation of the computer system for receiving, processing and storing genetic, genealogical and survey input data. Specifically, FIG. 2 depicts an input data processing module 110, an IBD estimation module 115, a DNA sample store 140, and a user data store 145. The input data processing module 110 is responsible for receiving, storing and processing data received from an individual 101 via the DNA extraction service 102. The input data processing module 110 comprises a DNA collection module 210, a genealogical collection module 220, a survey data collection module 230, genotype identification module 240, genotype phasing module 250, and ethnicity estimation module 260.

The DNA collection module 210 is responsible for receiving sample data from external sources (e.g., extraction service 102), processing and storing the samples in the DNA sample store 140.

Although not necessarily a part of any particular illustrated module, a new user to the system 100 who is submitting their DNA among other data will activate a new account, often through graphical user interface (GUI) provided through a mobile software application or a web-based interface. As part of the account activation process, the system 100 receives one or more types of basic personal information about the individual such as age, date of birth, geographical location of birth (e.g., city, state, county, country, hospital, etc.), complete name including first, last middle names as well as any suffixes, and gender. This received user information is stored in the user data store 145, in association with the corresponding DNA samples stored in the DNA sample store 140.

The data stored in the DNA sample store 140 may store one or more received samples DNA linked to a user as a <key, value> pair associated with the individual 101. In one instance, the <key, value> pair is <sampleID, “GA TC TC AA”>. The data stored in the DNA sample store 140 may be identified by one or more keys used to index one or more values associated with an individual 101. In one example, keys are a userID and sampleID, or alternatively another <key, value> pair is <userID, sampleID>. In various embodiments, the DNA sample store 140 stores a pointer to a location associated with the user data store 145 associated with the individual 101. The user data store 145 will be further described below.

II.b. Genealogical Data

The genealogical collection module 220 both receives and processes data provided by an individual for storage in the user data store 145 in association with their accounts. The genealogical collection module 220 specifically is configured to receive detailed information about an individual's family history. In some instances, family history can take the form of a pedigree of that individual (e.g., the recorded relationships in a family). To collect the data, the genealogical collection module 220 may be configured to provide an interactive GUI that asks the individual questions or provides a menu of options, and receives user input that can be processed to obtain the genealogical data. Examples of genealogical data that may be collected include, but are not limited to, names (first, last, middle, suffixes), birth locations (e.g., county, city, state, country, hospital, global map coordinates), date of birth, date of death, marriage information, family relations (manually provided rather than genetically identified), etc. These data may be manually provided or automatically extracted via, for example, optical character recognition (OCR) performed on census records, town or government records, or any other item of printed or online material.

In one or more embodiments, the pedigree information associated with a user comprises one or more specified nodes. Each specified node in the pedigree represents either the individual themselves or an ancestor of individual 101 corresponding to a stored DNA sample. Therefore, the nodes represent pedigree members that are either the individual themselves, or individuals that could have passed down generic material to the associated individual 101.

The pedigree information provided by individuals may or may not be perfectly accurate. The genealogical collection module 220 is responsible for filtering the received pedigree data based on one or more quality criteria in an effort to discard lower quality genealogical data. For example, the genealogical collection module 220 may filter the received pedigree data by excluding all pedigree nodes associated with a stored DNA sample that do not satisfy all of the following criteria: (1) recorded death date for a the linked pedigree node corresponds to official records (when available), (2) the gender is the same as the gender provided by the individual; and (3) the birth date is within 3 years of the birth date provided by the individual. It should be noted that in various instances, DNA samples that do not satisfy these criteria are still included in the subsequent analysis but either the associated pedigree data are not used, or the individual is prompted via GUI to resolve any discrepancies identified by module 220. In some embodiments, all received genealogical data marked as “private” are excluded from the any subsequent analysis to ensure that privacy requirements are met.

II.c. Survey Data

The survey data collection module 230 both receives and processes data provided by an individual for storage in the user data store 145 in association with their user accounts. The survey data collection module 230 is configured to receive information provided by individual in response to survey questions that ask about phenotypes that fall outside of those collected by the genealogical collection module 220.

Examples of survey questions include questions about an individual's phenotype, such as physical traits (e.g., height, hair, skin pigmentation, freckling, bitter taste, earlobe type, iris patterns, male pattern baldness, hair curl), wellness phenotypes (e.g., lactose tolerance, caffeine consumption, malaria resistance, norovirus resistance, muscle performance, alcohol flush), and personal preferences (e.g., likes and dislikes).

II.d. Processing and Phasing DNA Samples

The genotype identification module 240 accesses the collected DNA data from the DNA collection module 210 or the sample store 140 and identifies autosomal SNPs so that the individual's diploid genotype on autosomal chromosomes can be computationally phased. For example, for one individual 633,299 autosomal SNPs may be identified to estimate genotype phase. The genotype identification module 240 provides the identified SNPs to the genotype phasing module 250 which phases the individual's diploid genotype based on the set of identified SNPs. The genotype phasing module 250 is further described below.

As discussed immediately above, the genotype phasing module 250 generates a pair of estimated haplotypes for each diploid genotype. The estimated haplotypes are then stored in the user data store 145 in association with the user, and may also be stored in association with or verified against the genotypes of the individual's parents, who may also have their own separate accounts in the computing system 100.

A variety of different computational phasing techniques may be used including, for example, the techniques described in U.S. Patent Application No. 2016/061,568, filed on Jan. 17, 2014, which is hereby incorporated by reference in its entirety. The phasing module 250 stores phased genotypes in the user data store 145.

II.e. Ethnicity Estimation

The ethnicity estimation module 260 is responsible for estimating the global ancestral origins (“ethnicity”) from an individual's SNP genotypes. In the genetics literature, this is often described as using genetic polymorphism data to estimate the proportion of the genome that is attributed to two or more defined ancestral populations. The ethnicity estimation module 260 accesses as input the diploid genotype of an individual from the genotype identification module 240 or the DNA sample store 140. Information may also be accessed that includes reference data that provide population-specific statistics to assist in the computation of the ethnicity estimates. Specifically, the reference data may include reference features such as population-specific SNP allele frequencies for one or more defined ancestral populations.

For purposes of this description “ancestral” ethnic origin is distinguished from community membership in that “ancestral” ethnic origin generally refers to origin of DNA from further in the past (e.g., 500 to thousands of years in the past, though this range is flexible) whereas community membership generally refers to commonality in IBD overlap (and thus DNA “origin”) from a more recent period of time relative to the “ancestral” range under consideration (e.g., 100-400 years in the past, though this range is also flexible). Thus, the distinction between ancestral origin for ethnicity and community membership is specifically between each other, that is, two separate but not overlapping broad range of historical years.

Further, although ethnicity is often associated with geographic areas (and is labeled as such, e.g., “North Italian”), the two are not synonymous. Ethnicities most generally refer to populations of individuals in ancestral ranges of time, which may or may not overlap with particular geographical areas (e.g., “Ashkenazi Jewish”).

The ethnicity estimate module 260 compares the individual's diploid genotype against the reference features to estimate the degree of overlap between the two sets. In one embodiment, if there is a threshold amount of overlap between a section of one of the chromosomes of the individual and that of one of the reference features, the individual may be labeled with the ethnicity associated with the at least partially overlapping reference feature. The labeling may also occur if a sufficient number of reference features are partially overlapping, or based on the extent of overlap. The ethnicity estimate output of the ethnicity estimation module 260 algorithm takes the form of a vector of estimated ethnicity proportions of length K, where K is the number of ancestral populations under consideration. Since these are proportions, each vector entry is a number greater than or equal to 0, and all the entries of the vector sum to 1. To take a simple example of K=3 ancestral populations corresponding to African, European and Native American, it is not unusual for a user of Mexican origin to have nonzero estimated ethnicity proportions for all three ancestral populations, with an estimate such as [0.05, 0.65, 0.30], indicating that the user's genome is 5% attributed to African ancestry, 65% attributed to European ancestry and 30% attributed to Native American ancestry. The ethnicity estimation module 260 stores the estimated ethnicities in the user data store 145 in association with a particular user.

Various techniques may be used to generate the ethnicity estimate. In one embodiment, the ethnicity estimation module 260 estimates ethnicity using the techniques further described in U.S. patent application Ser. No. 14/020,577 filed on Sep. 6, 2013, which is hereby incorporated by reference in its entirety. In other embodiments, the ethnicity estimation module 260 estimates ethnicity using any one of a number of techniques, such as the STRUCTURE or ADMIXTURE algorithms. In one embodiment, the ethnicity estimation module 260 uses haplotype data to improve the accuracy of ethnicity estimate which is further described in U.S. Patent Application No. 62/191,968 filed on Jul. 13, 2015, which is hereby incorporated by reference in its entirety.

II.f IBD Estimation

The IBD estimation module 115 is responsible for identifying IBD segments (also referred to as IBD estimates) from phased genotype data (haplotypes) between pairs of individuals stored in the user data store 145. IBD segments are chromosome segments identified in a pair of individuals that are putatively inherited from a recent common ancestor. Typically, individuals who are closely related share a relatively large number of IBD segments, and the IBD segments tend to have greater length (individually or in aggregate across one or more chromosomes), while individuals who are more distantly related share relatively few IBD segments, and these segments tend to be shorter (individually or in aggregate across one or more chromosomes). For example, while close family members often share upwards of 71 cM of IBD (e.g., third cousins), more distantly related individuals may share less than 12 cM of IBD.

In one embodiment, the IBD estimation algorithm used by the IBD estimation module 115 to estimate (or infer) IBD segments between two individuals is as described in U.S. patent application Ser. No. 14/029,765, filed on Sep. 17, 2013, which is hereby incorporated by reference in its entirety. Another further processing step may be performed on these inferred IBD segments by applying the technique described in PCT Patent Application No. PCT/US2015/055579, filed on Oct. 14, 2015, which is hereby incorporated by reference in its entirety. The identified IBD segments are stored in the user data store 145 in association with the user.

The IBD estimation module 115 is configured to estimate IBD segments between large numbers of individuals stored in the user data store 145. That is, between each individual and many other individuals in the user data store 145. These IBD estimates are used in aggregate to build IBD networks as described in Section III below. The exact extent to which IBD calculations are performed (i.e., between every pair of users vs. between only a subset of pairs of users) depends on the implementation. In one embodiment, IBD estimates between any given pair of users may only be calculated if some prior information is known (e.g., genealogical, genetic) that links them, or if an initial pre-calculation suggests there will be at least a threshold amount of IBD sharing between the pair. The selective calculation of IBD estimates described above may help reduce processing time required to identify IBD segments.

In some embodiments of this module, the computing system has been optimized to efficiently handle large amounts of IBD data. Said another way, IBD is estimated across a large number of individuals based on their DNA. For example, in one implementation, the IBD estimation module 115 (and computing system 100 generally) distributes IBD computations over a Hadoop computing cluster, internal to or external from computing system 100, and stores the phased genotypes used in the IBD computations in a database so that IBD estimates for new accounts/individuals can be quickly compared to previously processed individuals.

III. IBD Networks

FIG. 3 is a flow diagram for constructing an IBD network, inferring clusters in the network, and annotating the IBD network clusters, in accordance with an embodiment. These techniques are carried out by the IBD network module in conjunction with the user data store 145 and the IBD network store 155. In one embodiment, to accomplish these tasks the IBD network module 120 itself comprises an IBD affinity metric module 310, an IBD community generation module 320, and a community annotation module 330.

III.a. Constructing the IBD Network

The IBD affinity metric module 310 accesses estimated IBD segments from the user data store 145 in order to generate an IBD network (also referred to as an IBD graph). It should be noted that, as used herein, the terms cluster and community are used interchangeably. That is, both the terms cluster and community refer to a subset of nodes in a determined IBD network. In various embodiments, the set of clusters in the IBD Network are identified by selecting clusters that maximize the modularity objective defined with respect to the IBD network. Clusters identified from a network in this way are often referred to as “communities” in the network analysis literature; for instance, see M. E. J. Newman, Nature Physics, 2012 (doi:10.1038/nphys2162). Although modularity-maximizing algorithms may be employed to identify clusters in one or more embodiments, the term “community” is not used in the strict technical sense of a modularity-maximizing clustering, but is instead used more generally to refer to clusters identified in a network by taking any one of several existing network clustering approaches developed in the network analysis or machine learning areas.

III.a.i. Filtering Users Used to Construct the IBD Network

In one embodiment, the IBD network is constructed using a filtered subset of users from the user data store 145 who meet at least one filtering criteria. The filtering of users for inclusion in the IBD network may be on the basis of age of the users, ethnicity estimates of the users, or both, or other factors. In the case of age filtering, filtering may include identifying users above a certain age (e.g., a birth date earlier than a certain date), below a certain age, or any other age-related criteria. For example, the user population for inclusion in the IBD network (generally) or in a particular reference panel (specifically) may be selected so as to result in an aggregate age (e.g., average age, median age) above a threshold age.

In the case of an ethnicity filter criteria, filtering may include identifying users having above or below a threshold diversity either individually, or in groups. This information may be obtained on the basis of ethnicity estimates obtained for individuals, example processes of which are described in Section II.e. above. For group ethnicity filtering, this can be carried out by specifying a maximum or minimum ethnicity heterogeneity for a group of users previously identified as being part of a same population, for example using an IBD network constructed without using filtering, or according to another technique such as geographic area grouping by birth location. Examples of how to calculate ethnic heterogeneity for communities are discussed below in Section V.

Filtering users for inclusion in the IBD network is useful generally because it can allow the IBD network, once created, to allow better delineation of novel communities and sub-communities as discovered through the processes describe below in the remainder of Section III. If communities show a strong separation within their membership by age or ethnic heterogeneity, this can inform additional discovery analysis.

In one embodiment a first IBD network may be constructed without filtering criteria. The system 100 obtains one or more of: ethnicity estimates for individuals in the IBD network, ethnicity heterogeneity for communities in the network, and age information. The system 100 then constructs a second IBD network (or reconstructs the first IBD network), using the one or more of the ethnicity estimates, ethnicity heterogeneity information, and age information as filtering criteria to select the individuals used to construct the second IBD network.

The IBD network includes a number of nodes with one or more weighted edges connecting some of the nodes to each other. Each node corresponds to one of the individuals from the user data store 145. Each edge between one node and another node has a weight, a numerical value, based on the IBD estimate between the two nodes, as generated by IBD estimation module 115.

More specifically, the IBD affinity metric module 310 defines a mapping (also called an “affinity measure”) from the total length of the shared IBD segments between two individuals (e.g., i and j) to the weight of the edge linking nodes i and j in the network. In one or more embodiments, the affinity measure is a real number between 0 and 1. For example, if the total length of the shared IBD segment between nodes i and j is greater than 65 cM (e.g., third cousins), then the edge linking nodes i and j receives a value of 0.97 or greater. Alternatively, if the total length of the shared IBD segment is 4-10 cM or less (e.g., distantly related or distant cousins), the edge may receive a weight of 0.

The mapping function between IBD estimates and edge weights may be any continuous or discontinuous function with the function domain defined by the set of possible total IBD length estimates. In one specific embodiment, the IBD affinity metric module 310 maps the total IBD segment lengths to edge weights by: (1) choosing a target range of generations; (2) empirically assessing, using a reasonably realistic simulation, the distribution of total IBD lengths among pairs of individuals that share common ancestors within that range of generations; and (3) defining the affinity metric so that high weights are placed on total IBD lengths arising from familial relationships sharing common ancestors corresponding to the chosen range of generations. This has the effect of more heavily weighting the edges between relatives sharing common ancestors in the target generation range; e.g., for a generation range of 0-4 generations ago, more weight is assigned to edges between relatives separated by eight meiosis events or less, and less weight is placed on nine meiosis events and more distantly related connections, where one meiosis event corresponds to a parent-child relationship, two meiosis events corresponds to siblings or to a grandparent-to-child-relationship, and so on.

In one embodiment, the IBD-to-edge-weight mapping function was chosen based on a Beta cumulative density function (CDF) (i.e., Probability(X≤x), where x is the IBD estimate between any pair of individuals) with scale parameters α=1.1 and β=10 which defines the weights for all edges in the IBD network. It should be noted that other choices for the mapping from total IBD length to edge weight may result in the generation of an IBD network with different characteristics. For example, placing greater weight on more distant familial relationships might reveal structure arising from population events at different time periods.

III.b. Inferring Communities

The IBD community generation module 320 partitions the IBD network generated by the IBD affinity metric module 310 into two or more communities. Various algorithms may be used to cluster the IBD network. Examples are algorithms that have been developed in statistical physics and machine learning to identify “strongly connected” subsets of a network, in which the density of edges within each subset is much higher than expected. Described, below, is just one method by which clusters may be identified in an IBD network. Examples of alternative network clustering algorithms include spectral graph clustering methods. In various embodiments, communities may be detected using other clustering algorithms such as Locally Linear Embedding or Normalized Cuts.

In one embodiment, the IBD community generation module 320 identifies the communities through recursive application of the multi-level Louvain method, which is a modularity-optimization-based community detection algorithm (also called “community detection”). In other embodiments, communities may be identified via recursive application of a community detection algorithm other than the Louvain method.

In an implementation using the Louvain method, the IBD community generation module 320 identifies a high-modularity partition of the network by recursively applying the Louvain method to IBD network S comprising nodes N connected to each other via edges M each having a weight. In the Louvain method, the degree of modularity, Q, of a network partitioning is defined according to:

$\begin{matrix} {Q = {{\Sigma_{k}\Sigma_{{({i,j})} \in S_{k}}\mspace{14mu} a_{ij}} - \frac{d_{i}d_{j}}{2m}}} & (1) \end{matrix}$

where k is the community index, S_(k) is the set of edges among all nodes assigned to community k, a_(ij) is the weight of edge (i,j), d_(i) is the “degree” of node i, defined to be the sum of all edge weights for edges connecting node i, and m is the sum of all “degrees”. The computation time associated with community detection grows linearly with the number of edges, M (i.e., O(M)). The Louvain algorithm heuristically maximizes the modularity Q associated with a network S.

The community detection algorithm divides network S comprising N nodes into C communities. The partitioning of the network into communities using the Louvain method described above is denoted (A₁, A₂, A₃, . . . , A_(C)). Following completion of the community detection algorithms, communities (A₁, A₂, A₃, . . . , A_(C)) are labeled as a “valid” if they each comprise a given threshold number of nodes t. A community A_(i) with less than the threshold number of nodes is not considered a valid community (i.e., an “invalid” community) and is, thus, omitted from subsequent steps of the community detection analysis and model training (its constituent nodes are left to stand alone without being labeled as a community). In one embodiment, the threshold number of nodes t is 1,000. However, in other embodiments the threshold number is any integer number of nodes greater than 0. The set of communities labeled as valid are denoted by (A′₁, A′₂, A′₃, . . . , A′_(C)), where C′ is less than or equal to C.

This threshold cutoff for performing the community detection algorithm again within a community helps ensure that any detected communities will contain a large enough number of nodes to be interpreted as a group of historical or geographic significance. If a community has below the threshold number of nodes t, there is a sufficiently high likelihood that any identified subcommunities that could be generated through another application of the community identification algorithm would potentially over-fit/over-analyze the data and suggest a subpopulation that does not have an analog that experts in the field would recognize. The threshold number of nodes may be anywhere between 1000 and 10,000, depending upon the exact implementation of the system.

Once a set of valid communities is determined, the IBD community generation module 320 applies the community detection algorithm (e.g., Louvain method) again on each IBD sub-network defined by the nodes in community A_(i)′ to identify sub-communities within each community A_(i)′. To distinguish the initial set of communities from the sub-communities, the initial set of communities are called “level 1” communities, and the sub-communities are called “level 2” communities, to connote the fact that these communities can be viewed as hierarchical sets of clusters.

To identify a sub-community for each level 1 community A_(i)′ (i=1, 2, . . . , C′), the IBD community generation module 320 performs two steps. First, the IBD community generation module 320 generates a subgraph g_(i) for each community A_(i)′ in the set of communities A_(i)′ (i=1, 2, 3, . . . , C′). The subgraph g_(i) is defined by the subset of nodes n that are assigned to a community A_(i)′ and the subset of edges m such that (i,j) is included in the subset if and only if both i and j are assigned to community A_(i)′.

Next, the IBD community generation module 320 applies the Louvain method (or another community detection method) on the subgraph g associated with the community A_(i)′. For example, if a level 1 community A₁′ is associated with a subgraph g₁ the Louvain method is applied to the subgraph g₁. After applying the community detection algorithm to each subgraph g_(i), with i=1, 2, . . . , C′, the result is a set of sub-communities (B₁, B₂, . . . B_(D)), where D is the total number of sub-communities identified in all of the subgraphs. D must be greater than or equal to 2C′. Similar to before, only “valid” communities exceeding a previously specified size are retained (and this may be a different (second) threshold than the (first) threshold t used for determining the level 1 communities), resulting in a final set of level 2 communities, sub-communities (B′₁, B′₂, . . . B′_(D′)), in which D′ is less than or equal to D.

The process described above may be repeated for subsequent levels of communities as long as at least one community has greater than the threshold number of nodes t as introduced above. For example, communities at level 3 may be delineated by module 320 by once again generating a subgraph g_(i) for each level 2 community B_(i) and applying the Louvain method to each subgraph g_(i).

Following this description, an example pseudocode for the IBD community generation module 320 is as follows:

procedure community(S) C ← Louvain(S) // Identify set of communities associated network S for each A_(i) in C do if(Size(A_(i)) ≥ 1,000) then g_(i) ← buildSubgraph(S, A_(i)) C ← concatenate(C, community(g_(i))) return C //C is an array of communities and sub-communities associated with network S, which can be interpreted in a hierarchy of clusters.

The procedure delineated through the example pseudocode above results in a hierarchy of communities by recursively fragmenting or subdividing groups of connected nodes. The algorithm illustrated by the pseudocode above automatically stops subdividing further when the size of the subnetwork defined by a community contains fewer than 1,000 nodes.

FIG. 4 is an illustration of an example result of running a hierarchical clustering algorithm on an IBD network, in accordance with an embodiment. Example IBD network 410 has six level-1 communities and an illustrated number of nodes in each level 1 community. Further illustrated is how the hierarchical clustering algorithm can be applied to subdivide five out of the six level 1 communities 430 into twenty level 2 communities 440, and further subdivide these into fifty level 3 communities 450, however in practice the exact community structure may vary.

III.c. Annotating IBD Communities with Genealogical Data

Returning now to FIG. 3, the community annotation module 330 is responsible for annotating a community A_(i) with information drawn from the individuals that make up each community, such as ethnicity estimates, surnames, birth locations of the individuals or their ancestors, and responses to survey questions. The following paragraphs explain ways in which the community annotation module 330 compiles these annotations into distinguishing features that may be used to suggest a demographic or geographic interpretation of each community.

One type of annotation is provided by the ethnicity estimation module 260. In one embodiment, the ethnicity-based annotations can be used to estimate which ancestral populations are over-represented or under-represented by the individuals from the set of nodes comprising a given community. In some cases, communities with highly over-represented ancestral populations can be related to known human population structure when the interpretation of the ancestral populations is known in advance. For example, in one embodiment, communities corresponding to recent US immigrant groups such as Finnish, Jewish and Irish can be identified from the ethnicity-based annotations because some of the ancestral populations in the ethnicity estimation are defined for Finnish, Jewish and Irish. In one specific embodiment, the ethnicity-based annotations are summarized into a convenient form by compiling, for each ancestral population, the distribution of estimated ethnicity proportions among all individuals assigned to the community, and comparing against the distribution of estimated ethnicity proportions among individuals that are not assigned to the community.

Other embodiments may use alternative or more complex algorithms for summarizing the ethnicity estimates within a community, and may limit which nodes are considered in the calculation of the ethnicity-based annotations. For example, an ethnicity-based summary for a community may be determined based on the ethnicity estimates only for network nodes associated with individuals having birth dates within a specified range of years in order to better summarize the ethnic diversity of individuals from certain generations.

Another type of annotation provided by the community annotation module 330 comprises birth locations of ancestors associated with individuals assigned to a community, which can provide useful geographic clues relating a community to historical populations. To do this, the community annotation module compiles statistics from the ancestral birth location data specific to each community.

In one embodiment, the community annotation module 330 may summarize the birth location data so that it may be visualized in a graphical map format. This is accomplished, for example, by converting each birth location, within a specified range of generations, to the nearest coordinate on a two-dimensional (2-D) grid, with grid points every 0.5 degrees of latitude and longitude. Then the location of each grid point plotted on the map is the mean latitude and longitude over all the annotations assigned to that grid point.

The community annotation module 330 computes, for each grid point in the 2D grid, an odds ratio (OR). The OR is defined as the odds that a given grid point of the 2-D grid is associated with a community member over the odds that the same grid point is associated with a user who is not a member of the community. Using this OR measure, the community annotation module 330 generates a graph (or plot) that visually depicts grid points in which the largest odds ratios are indicated visually by labels or distinguishable colors, for example. In this way, the highlighted graphical map locations correspond to geographic locations that are disproportionately represented in a given community. For example, the birth locations of ancestors 0-5 generations ago associated with the Utah cluster are more highly concentrated in Utah, and this is reflected in this visual summary by map locations with particularly high odds ratios.

The community annotation 330 may then use the labels associated with specific geographic locations in the plot as an input to determine which of those geographic location labels are annotated and stored in association with the community in one of the data stores. The graphical maps and plots described above are useful because in various implementations they may be presented to a user via a GUI. However, actual generation of the graphical maps and plots is not strictly necessary in order to determine the geographic locations to annotate to a given community. The description above may be accomplished entirely through non-graphical means, that is by grouping data by geographical location, computing odds ratios based on the groups, and performing statistical analysis on the result to determine the labels.

In addition to an ethnicity and geographic origins, the community annotation module 330 may use surname annotations to generate additional historical or geographic clues about a community. To summarize surnames for a given community, the community annotation module 330 collects all surnames of recent ancestors (e.g., born after 1900 A.D.) associated with individuals who are assigned to the community. To highlight surnames that are more likely to be characteristic of the community, and therefore more likely to yield informative clues about the historical or demographic significance of the community, for each identified surname, in one embodiment, the community annotation module 330 quantifies the statistical evidence (e.g., p-value) that a given surname is over-represented in a given community compared against the background surname distribution over all individuals included in the generated IBD network. The community annotation module 330 ranks the surnames according to the statistical evidence (e.g., smallest p-values), and selects the 10 most highly ranked surnames as surnames that are characteristic to the given community. For example, the most highly ranked surnames from the surname annotations associated with individuals assigned to an Irish community include “McCarthy”, “Sullivan”, “Murphy”, “O'Brien”, and “O'Connor”.

The community annotation module 330 may similarly annotate a given community using other items of data associated with the individuals assigned to that community as collected by either the genealogical collection module 220 or the survey data collection module 230, such as marriage data and responses to survey questions.

The community annotation module 330 performs annotation on many if not all communities in the IBD network. If the communities are arranged in a hierarchy (e.g., through recursive application of the Louvain method), then this may include communities at any level of the clustering hierarchy (level 1, level 2, level 3, etc.). The resulting summary for each community compiled from the annotations are stored in the IBD network store 155.

IV. Generating a Model to Classify Individuals into Communities

FIG. 5 is a flow diagram for generating a model to assign individuals to communities, in accordance with an embodiment. In FIG. 5, the model training module 125 accesses communities (e.g., generated as described in Section III) from the IBD network store 155 and uses the communities to build a model that can be later used to predict which community, or communities, an individual belongs to based on their DNA sample. This process is applied to all communities identified in the IBD network, after removing communities that do not satisfy additional criteria for being “valid”. In cases where the communities can be viewed as a hierarchy, in which each level of the hierarchy subdivides the communities from the previous level, this process can applied to all communities at all, or selected, levels of the hierarchy.

To do this, the model training module 125 generates 510, for each community stored in the IBD network store 155, a reference panel 510, refines 520 the generated reference panel, generates one or more candidate features 530 that may be useful for predicting whether a given user is or is not a member of a given community based on the refined reference panels, and trains 540 a community classification model using the selected features and the refined reference panels. For clarity of terminology, this is described as a multi-way classification problem, in which each user may be classified into zero, one or more communities. Since each community assignment can be considered as a separate classification problem, a “model” refers to the classification of a single community, and is trained separately from other models. Therefore, the training process results in a collection of models that are configured to predict whether or not a given individual belongs to each community. Once the models have been trained on the reference panel data, the community prediction module 130 can use the model to predict which, if any, communities, a new user 101 is a member of based on the new user's genetic sample. The system 100 can use these community predictions to provide a report detailing the individual's predicted community membership without needing to re-build the IBD network or re-train the model.

IV.a. Generating Reference Panels

The model training module 125 receives from the IBD network store 155 a set of communities (or, equivalently, clusters) previously identified in an IBD network and generates a reference panel 510 for each community. To generate 510 the reference panels, the model training module 125 may simply identify all of the individuals in a community. Alternatively, module 125 may generate the reference panel based on some subset thereof. For example, a generated reference panel 510 comprises a subset of individuals selected uniformly at random from the set of individuals (network nodes) assigned to a given community. In one embodiment, a generated reference panel 510 may be limited to those individuals in a community by their birth locations, or the birth locations of their ancestors or descendants. As another example, a generated reference panel may include individuals from a community who also have West African ancestry based on their ethnicity estimates. The generated reference panels are stored in the panel store 160 in association with a particular community as stored in the IBD network store 155.

IV.b. Refining the Generated Panels

The model training module 125 refines 520 the generated 510 reference panels in an effort to remove individuals who are less representative of the community. In one embodiment, to refine a given reference panel R_(i) (i=1, 2, . . . , P), where P is the total number of reference panels), the IBD community generation module 320 is used to run a community detection algorithm (e.g., Louvain method) on a random subgraph consisting of randomly selected set of individuals (i.e., nodes) and the IBD connections between these individuals (i.e., the weighted edges of the network). The model training module 125 repeats the process described above a number of times (e.g., 20 times) separately on each random subgraph. Note that the subgraphs must be large enough that each individual in the full IBD network is included multiple times in the subgraphs. In this analysis, the number of times individual i is assigned to the same community provides a way of ranking the “stability” of the clustering for individual i. Note that the concept of “same community” is not completely well-defined because application of the clustering algorithm to random subgraphs can produce different numbers of communities, but for simplicity the model training module 125 can consider the subset of communities that have some threshold degree of overlap in terms of the proportion of individuals assigned. In cases where a hierarchical clustering approach is implemented, this stability analysis is restricted to communities at the same level of the hierarchy. In an embodiment, individuals with a stability ranking greater than a certain threshold number (e.g., 10) are excluded from the reference panel R.

IV.c. Candidate Feature Generation

The model training module 125 uses the refined reference panels to select features that will be subsequently used to train the models introduced above. The set of candidate features included in the selection step are all defined as counts of the number of connections between a given individual and all individuals included in a reference panel, restricted to connections within a given edge weight interval or, equivalently, within a given range of estimated total IBD shared. For simplicity of terminology, each feature thus represents some “degree of connectedness” between an individual and a set of individuals included a given reference panel. There is a different set of such features for each reference panel. Therefore, the total set of candidate features includes a feature for each edge weight interval and for each reference panel. For example, supposing that the edge weights are subdivided into 6 intervals, and 300 reference panels have been generated, then a total of 1,800 candidate features are included in the feature selection step.

In one embodiment, in addition to candidate features based on number of IBD connections to a reference panel, additional candidate features may be defined based on ethnicity estimates generated for an individual by the ethnicity estimate module 260.

IV.d. Selection of Most Predictive Features

However, not all defined candidate features are useful for predicting whether or not a given user is a part of a given community. Therefore, to prevent generation of overly complex models that use less informative features (“overfitting”), and to improve the computational speed and efficiency of the trained models for generating individual predictions in the community prediction module 130, the training module 540 first selects, for each community, candidate features that are estimated to be most predictive of the assignment of an individual to a community.

To estimate which features are most predictive of community assignment, the model training module 125 runs a feature selection algorithm to estimate the prediction ability of each feature, where the prediction ability is represented as a numerical value, often normalized within the range of 0 to 1. Examples of algorithms that may be used to implement the feature selection include, but are not limited to, sparse penalized regression (e.g., Lasso), a forward/stepwise regression method, recursive feature elimination, and regularized trees.

For a given community, the input data to the feature selection algorithm are the computed values of the candidate features for all individuals in all reference panels, and an additional binary (“0” or “1”) training label for each individual indicating whether or not it has been assigned to the given community. An individual in a reference panel belonging to the given community is assigned a label of “1”, and an individual in a reference panel that does not belong to the same community is assigned a label of “0”. In one embodiment, the input data are the computed feature values and labels for a set of individuals drawn randomly from the reference panels. When the features represent numbers of IBD connections within defined edge weight intervals, the computed feature values are counts calculated by accessing the IBD data in the user data store 145.

The model training module 125 selects the most predictive features (i.e., those estimated to have the highest prediction ability), and removes the remaining features from consideration/use in the model (in some embodiments, this is accomplished simply by setting their corresponding weight or regression coefficient in the model to 0). The number of selected features will vary by implementation, and may vary for each model.

IV.e. Training the Community Classification Model

For each community in the IBD network store 155, the model training module 125 uses the selected features to train 540 the model for that community. Specifically, the model training module 125 uses the set of candidate features selected for that community to train a corresponding model using a supervised machine learning technique. Once training is completed, and the model is saved in the model store 150, the model is able to generate, for a single individual, a score, likelihood or probability for predicting assignment of that individual to the community. In one embodiment, the model outputs a probability (a real number between 0 and 1), in which a number close to 1 indicates that the individual is classified to the community with high confidence, and a number close to 0 indicates with high confidence that the individual is not a member of the community.

The input data to the model training algorithm is the same or similar to the input data provided to the feature selection algorithm above. Individuals that are a part of the community associated with the model being trained are assigned training labels of “1,” indicating that they should be classified into the community. Individuals that are part of any other community are assigned training labels of “0,” indicating that they should not be classified into the community. In one embodiment, individuals are drawn from reference panels at random to construct the training set provided as input to the model training algorithm and for use in training the model, however in other embodiments the input data may be differently selected. The values for the features used in the training are again the values for those input data individuals.

Any one of a number of supervised learning techniques may be used to train the models. Examples include, but are not limited to, random forests and other ensemble learning techniques, support vector machines (SVM) and logistic regression. Regardless of which supervised learning technique is used, the training process involves determining the numerical values of model parameters so that the model best “fits” the training data. Therefore, the trained model is specified by the fitted values of the model parameters. For example, if a random forests approach is used, the model parameters will consist of the features and splitting criteria that define each decision tree in the random forest model.

Once models have been trained 540, the community identification module 125 stores the models, including the fitted model parameters, in model store 150.

IV.f. Classifying Individuals to Communities Using the Trained Models

The community prediction module 130 uses each trained model to compute, for a given individual, a score, likelihood or probability for assignment of that individual to the community (referred to as classifying the individual or user). The model may be used classify an existing individual, for example someone present in one of the reference panels, or a new user who has submitted their DNA sample for inclusion in the system 100.

The user to be classified has their DNA processed by various parts of the system 100. The user to be classified has their data processed using the genotype identification module 240 and the genotype phasing module 250. In some implementations, the ethnicity estimate module 260 may generate an ethnicity estimate for the user.

The community prediction module 130 then, in conjunction with the IBD estimation module 115, generates IBD estimates between the user and all individuals included in the reference panels stored in the panel store 160. Alternatively, only a subset of those IBD estimates may be generated based on which features and/or individuals are included in the data sets used to train the models. This can reduce processing costs in generating community classification predictions, as it may not be necessary to know all IBD estimates when the models only make use of some fraction of them.

For a single input individual, the community prediction module 130 compiles the IBD estimates (and, in some instances, the ethnicity estimates) into feature vectors according to the features selected for each of the models. Each model will receive a different feature vector depending on which features were selected and used to train that particular model. Thus, the estimated IBD that is relevant to the community classification will be different for each model (and hence, for each community).

The community prediction module 130 then computes a score, probability or likelihood for each model. In one implementation, an individual is classified as belonging a given community if the probability computed by the trained model exceeds a threshold numerical value. The threshold for classifying individuals to communities may be the same or different for each model. The output of the community prediction module includes both the classification and score/probability/likelihood for each community.

Due to a variety of factors such as the broad genetic diversity of the user base, the varying quality of the IBD estimates for different users, and the heterogeneity in composition of the communities identified in the IBD network, an individual may be predicted to be a member of zero, one, or more communities. In one embodiment, the output of the community prediction module may be reported to a user via a generated document or a GUI. Data reported in the document or GUI may also draw on annotations associated with the community, as well as historical or geographic interpretations drawing from summaries of the annotations associated with the community. This may include geographical features or regions distinguishing the community, and other historical, social or economic features characteristic of the community that may or may not be informed by the annotations. The community prediction module 130 may additionally produce reports that summarize IBD connections and other genetic estimates relevant to each community; for example, an estimate of the number of 2nd cousins that are classified as belonging to the same community as the user.

V. Characterizing Heterogeneity within Fine-Scale Population Structure

The association of individuals with communities can be analyzed to provide information about ethnicity heterogeneity in a community. In one embodiment, for one or more communities, an ethnicity heterogeneity module 135 selects a plurality of individuals associated with each of the one or more communities. These individuals may be selected from the reference panel individuals, as they are already associated with the communities. However, they may be, additionally or alternatively, drawn from another population of individuals who are associated with particular communities. This may be determined, for example, through the use of the processes described above with respect to the community prediction module 130. Within each community, individuals may be selected randomly, according a metric of genealogical relatedness (e.g., presence membership in a shared family tree), according to a metric of genetic related-ness (e.g., according to IBD overlap between the individual and the reference panel individual), responsive to a selection by a user via manual input, or according to some other selection metric.

For the selected set of individuals associated with each community, ethnicity is estimated across a number of different geographic areas. In one specific embodiment, the ethnicity estimation may be carried out using the ethnicity module 260, as described above in Section II.e. In other embodiments, other approaches may be used to estimate ethnicity. A set of ethnicity estimates is generated for each of the individuals, where the set for each individuals includes portions of that individual's DNA believed to originate with a given ethnicity.

In a further embodiment, the ethnicity module 260 or ethnicity heterogeneity module 135 may collapse the ethnicity estimates to group together ethnicities associated within a same macro-geographic area. For example, if the ethnicity estimates provided by the ethnicity module 260 for an individual provide a separate ethnicity estimation for each a number of ethnicities roughly corresponding to European countries, the ethnicity estimates may be collapsed into a single European continent ethnicity. This can improve the ethnicity heterogeneity calculations (described further below) in the event that one macro-geographic area's ethnicity estimation data is more specific than another's (e.g., if there is more specific ethnicity estimate information available about individual European ethnicities vs. less specific ethnicity information available about individual Pacific Island ethnicities). Different degrees of collapsing geographic areas are possible (e.g., by modern country, by arbitrary geographic area, etc.). For convenience of description, ethnicity estimates for individuals that have not been collapsed are referred to as un-collapsed or separate, ethnicity estimates. Collapsing the ethnicity estimates for an individual can be performed by addition of the ethnicity estimates within the geographic area being collapsed.

The ethnicity heterogeneity module 135 determines ethnicity heterogeneity for the community (or subset therein) using the ethnicity estimates, regardless of whether they are collapsed ethnicity estimates for macro-geographic areas or un-collapsed ethnicity estimates. In one embodiment, the ethnicity heterogeneity is calculated according to:

EH=1−Σ_(i)(p _(i) ²)

where i is the ethnicity or collapsed geographic area, and p is the proportion of a given ethnicity for individuals, from the ethnicity estimates originating from that ethnicity or collapsed geographic area. Generally, the more ethnically heterogeneous a community is, the closer EH will be to 1, and similarly the more ethnically homogenous a community is, the closer EH will be 0.

FIGS. 6A and 6B illustrate example distributions of ethnicity estimations for individuals associated with various communities, according to one embodiment. The examples of FIG. 6 were computed using the communities and ethnicity estimation techniques described earlier in this document. Each plot illustrates the individuals selected from a given community (e.g., Northern Italians for the first community and plot in the upper left of FIG. 6). Each y-axis element corresponds to one of the individuals from that community. Each x-axis element corresponds to a single ethnicity for which an ethnicity estimate is being generated (e.g., in these examples by un-collapsed country: Senegal, Mali, etc.). The cell value at each x/y pair represents what proportion of an individual's ethnicity is estimated to be originating from each ethnicity (e.g., the ethnicity estimate calculate by the ethnicity estimate module 260), where darker values indicate lower proportions of ethnicity (e.g., less of their genes originate from that ancestral population) whereas lighter values indicate higher proportions of ethnicity (e.g., more of their genes originate from that ancestral population). The upper left plot in FIG. 6 illustrates this, as most cells are dark, except for the ones associated with the “Italy” ethnicity, which is expected given that the community associated with this plot is the Northern Italy community.

FIGS. 9A and 9B illustration additional information about the population structure in North America, according to one embodiment. FIG. 9A illustrates ethnicity heterogeneity according to collapsed ethnicity estimates, specifically collapsed using twenty six ethnicities, and plotting community enrichment regions for a subset of all known communities in North America. FIG. 9A shows that the European communities in North America are characterized by intracontinental admixture.

The community enrichment regions show geographic areas where the ancestral birth locations of the community members is statistically more probable (here also referred to as “enriched”). In one embodiment, this is calculated as an odds ratio indicating of observing an ancestral birth for a member of a community in a given latitude/longitude pair. Degree of shading corresponds to degree of ethnicity heterogeneity within the community. In the example embodiment of FIGS. 9A and 9B, a community enrichment region for a community is defined as a set of all rounded latitude-longitude grid points with an odds ratio of at least a threshold (e.g., five), indicating a geographic area with a relative enrichment of birth locations.

Thus, in practice the system 100 can start with a set of community members and calculate forwards to determine what proportion of ethnicity estimates is due to different ethnicities for the individuals of the community. The examples of FIGS. 9A and 9B can be extrapolated to other embodiments. For example, with event information from the user data store 145 such as birth locations, death locations, or other event location information, the system 100 can determine and display graphical information showing any event-associated geographic extent of community members who share a significant proportion of ethnicity estimates, thereby indicating common ancestral origin (collapsed or un-collapsed). This information may be presented as part of a graphical user interface or report file provided to an individual.

FIG. 9B illustrates ethnicity heterogeneity according to collapsed ethnicity estimates, in this case specifically by collapsing ethnicity estimates into the seven continents. FIG. 9B specifically illustrates that non-European communities are largely a result of inter-continental admixture.

The ethnicity heterogeneity module 135 may further provide insight into relationships between age and community membership based on birth year information for individuals as known in the user data store 145. As in the previous embodiment, a number of individuals are selected from each of one or more communities. Also as above for ethnicity heterogeneity determination, this may include all members of a community, or it may be a sub-selection of the individuals in a community, either randomly or according to any one of a number of selection mechanisms.

In one embodiment, community membership for the purposes of these age-related calculations are defined as described in this paragraph. In one embodiment, communities comprise parents but not their children. In this case, children are added to the community when their parents are deceased. This may take the form of updating the reference panel for a community to include the children in place of the parents. As such, any measure of community age (e.g., average age of members), will only include parent's ages under this definition. Parent-child relationships between community members (or community-associated individuals) and their children are identified by accessing those relationships and from the user data store 145.

For any given community (or portion thereof), age ranges, aggregate age calculations (mean, median, standard deviation, absolute maximum, absolute minimum), and other statistics may be determined alongside or independent of ethnicity heterogeneity information.

FIG. 7A illustrates a plot of community age ranges for a number of communities, according to one embodiment. The y axis of FIG. 7 illustrates community member age, where the center line is the median, the box extends to include the first through third quartiles, and the endpoints include the maximum and minimum ages. Each bar/line along the x axis represents a different community. Communities with different patterns are grouped in association with community groups, generally associated with different macro-geographic areas (roughly, continents).

FIG. 7B illustrates a plot of the mean age of community members against the percentage of children older than 18 who are associated with the same community as their parents, according to one embodiment.

FIG. 8 illustrates an example plot of ethnicity heterogeneity, where ethnicity estimates have been collapsed by continent, against mean age of community members, according to one embodiment.

Generally, FIGS. 6 and 8 illustrate that knowing the community assignment of an individual is predictive of their age (FIG. 8), and ethnicity (FIG. 6). This is also evidence for the reverse scenario, that knowledge of age and/or ethnicity can be useful in improving community prediction.

V.A. Reporting Ethnicity Heterogeneity and Age Information

Ethnicity heterogeneity and age information may be reported to a user via a graphical user interface or transmitted data file. In one embodiment, the system 100 identifies one or more communities that a user is associated with. As an example, this process may be carried out in accordance with the description in Section IV.f. above. For each community, the system 100 determines ethnicity estimates for a number of individuals of the identified community. In one embodiment, this is carried out according to the ethnicity estimation module 260 discussed in Section II.e. above. Ethnicity estimation may be carried out for all of the individuals in a community, or for any subset thereof, for example for individuals in a community determined to be more connected to the user in question (e.g., either by threshold of IBD overlap, threshold by number of individuals considered, or another similar metric). In some embodiments, these ethnicity estimates may be collapsed as discussed above. The ethnicity heterogeneity module 135 calculates ethnicity heterogeneity for each of the one or more communities. In one embodiment, this is carried out according to the formula above.

Age information for the one or more communities may be determined or accessed by the ethnicity heterogeneity module 135. Additionally, by accessing the user data store 145 for event information, community enrichment regions may be determined for the identified communities.

Response to the request, the system 100 returns the ethnicity heterogeneity information for the one or more communities. Age information associated with that community or group of individuals may also be returned. Community enrichment plots may also be returned. The report may be provided as part of a graphical user interface or in a data file.

V.B. Classifying Individuals to Communities with Ethnicity Heterogeneity and Age Information

Ethnicity heterogeneity and age information about communities may also be used as part of or adjacent to a model for classifying individuals into communities, as discussed in Section IV of this document. Ethnicity heterogeneity and age information make be integrated at a number of points in the process of generating and using the model. For example, ethnicity heterogeneity information may affect which users are included in reference panels, which will affect IBD network generation as discussed in Section III.a.i. Somewhat similarly, ethnicity heterogeneity and age information may be used in reference panel refinement 520.

Ethnicity heterogeneity and age information may be used as features in individuals classifiers associated with individual communities as discussed in Sections IV.c. and IV.d. above. In this case, the ethnicity heterogeneity of a community may be compared against the ethnicity estimates for an individual to determine an ethnicity match feature. The ethnic background of the individual, as provided by the estimates, may be compared against the ethnicity heterogeneity of the community to determine a measure of similarity. The more similar the two, the greater the feature value and thus the greater the likelihood that the classifier for that community outputs a score indicating a high likelihood that the individual is associated with the community. In one embodiment, this similarity is calculated a dot product (cosine) similarity between two vectors, a vector of ethnicity estimates for the individual vs. a vector representing the ethnicity makeup of the community in aggregate. In another embodiment, a distribution similarity measure may be used. In this example, the various possible ethnicities that may be estimated for individuals may be modeled as separate distributions (e.g., Gaussian), under the presumption that each ethnicity estimate is a prediction and thus has some amount of error/confidence. Similarly, the ethnicities assigned to communities through the calculation of ethnicity estimates for individual community members and/or ethnicity heterogeneities since each has a mean and variation. Similar types of comparisons may be made for an age feature, which, for example, may be calculated based on a function of a distance between the individual's age and the aggregate age (e.g., mean, median) of the community.

Ethnicity heterogeneity and age information may also be used alongside the scores generated by the classifier associated with each community as discussed in Section IV.f. above. As discussed in that section, the community prediction module 130 computes a score for each community representing a likelihood of the user belonging to that community. Ethnicity heterogeneity and age information may be calculated as sub-scores and combined in a function with the community score of each community to generate a combined score, where the combined score again represents a likelihood of the user belonging to the corresponding community. The function may be a linear weighted combination, or any other function. The ethnicity heterogeneity and age information may be incorporated into the score to generate the combined score according to any one of a number of methods. Examples include the examples for the calculation of the ethnicity heterogeneity and age features above, for example cosign similarities or magnitudes of difference between the individual and the community may be used to determine these sub-scores.

V. Additional Considerations

Computing system 100 is implemented using one or more computers having one or more processors executing application code to perform the steps described herein, and data may be stored on any conventional non-transitory storage medium and, where appropriate, include a conventional database server implementation. For purposes of clarity and because they are well known to those of skill in the art, various components of a computer system, for example, processors, memory, input devices, network devices and the like are not shown in FIG. 1. In some embodiments, a distributed computing architecture is used to implement the described features. One example of such a distributed computing platform is the Apache Hadoop project available from the Apache Software Foundation.

In addition to the embodiments specifically described above, those of skill in the art will appreciate that the invention may additionally be practiced in other embodiments. Within this written description, the particular naming of the components, capitalization of terms, the attributes, data structures, or any other programming or structural aspect is not mandatory or significant unless otherwise noted, and the mechanisms that implement the described invention or its features may have different names, formats, or protocols. Further, the system may be implemented via a combination of hardware and software, as described, or entirely in hardware elements. Also, the particular division of functionality between the various system components described here is not mandatory; functions performed by a single module or system component may instead be performed by multiple components, and functions performed by multiple components may instead be performed by a single component. Likewise, the order in which method steps are performed is not mandatory unless otherwise noted or logically required. It should be noted that the process steps and instructions of the present invention could be embodied in software, firmware or hardware, and when embodied in software, could be downloaded to reside on and be operated from different platforms used by real time network operating systems.

Algorithmic descriptions and representations included in this description are understood to be implemented by computer programs. Furthermore, it has also proven convenient at times, to refer to these arrangements of operations as modules or code devices, without loss of generality.

Unless otherwise indicated, discussions utilizing terms such as “selecting” or “determining” or “estimating” or the like refer to the action and processes of a computer system, or similar electronic computing device, that manipulates and transforms data represented as physical (electronic) quantities within the computer system memories or registers or other such information storage, transmission or display devices.

Finally, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter. Accordingly, the disclosure of the present invention is intended to be illustrative, but not limiting, of the scope of the invention. 

1. A method comprising: obtaining a DNA sample from an individual; determining the genotype of the individual based on the DNA sample; accessing, from a non-transitory computer readable storage medium of a computing device, a plurality of reference panels each associated with one of a plurality of different communities, each community comprising a plurality of nodes, each node corresponding to a reference genotype of a different reference individual; comparing, with a computer processor associated with the computing device, the genotype against the reference panels to generate scores for the communities with respect to the genotype; identifying one or more communities associated with the individual based on the scores; calculating, for each of the one or more communities, an ethnicity heterogeneity for a subset of members of the community, the ethnicity heterogeneity representing a measure of ancestral population diversity in the origin of DNA of the subset of the members of the community; and generating a report for the individual including the ethnicity heterogeneities of the one or more communities.
 2. The method of claim 1 wherein, for each of the one or more communities, the subset of members of the community is selected from a based on a degree of IBD overlap between the individual and the members of the community.
 3. The method of claim 1, wherein calculating the ethnicity heterogeneity for one of the communities comprises: calculating, for each of the members of the subset, a plurality of ethnicity estimates for each of a plurality of ethnicities; each ethnicity estimate estimating an amount of the member's DNA originating from the ethnicity; and calculating the ethnicity heterogeneity based on the ethnicity estimates of the members of the subset.
 4. The method of claim 1, wherein the ethnicity heterogeneity is calculated based on the ethnicity estimates according to: EH=1−Σ_(i)(p _(i) ²) where i is the ethnicity, and p is an aggregate proportion of the ethnicity estimates associated with the ethnicity for the members of the subset.
 5. The method of claim 1, wherein calculating the ethnicity estimates for one of the members for one of the geographic areas comprises: calculating a plurality of separate ethnicity estimates for the member of the community for each of a plurality of ethnicities; and collapsing the separate ethnicity estimates into a collapsed ethnicity estimates for a macro-geographic area.
 6. The method of claim 1, further comprising: obtaining an aggregate age for the subset of the members of each of the one or more communities; including the aggregate age of each of the one or more communities in the report.
 7. The method of claim 1, further comprising: obtaining a community enrichment region plot for each of the one or more communities, each community enrichment region plot show one or more geographic areas where ancestral birth locations of the members of one of the communities are statistically more likely; and including the one or more community enrichment regions in the report.
 8. The method of claim 1, further comprising: sending the report to a remote computing device communicatively coupled with the computing device.
 9. The method of claim 1, further comprising: accessing pedigree information regarding the reference panel individuals, the pedigree information specifying information about ancestors of the reference panel individuals; annotating the communities with at least one of ancestral birth location labels and surname labels based on the pedigree information of the reference panel individuals associated with each community; and wherein generating the report further comprises a summary based on at least one of the birth location labels and the surname labels for the communities when the individual's score exceeds the threshold.
 10. The method of claim 1, further comprising: generating ethnicity estimates for the reference panel individuals; annotating the communities with ethnicity labels based on the ethnicity estimates associated with the reference panel associated with each community; and wherein generating the report further comprises sending a summary based on the ethnicity labels for the communities when the individual's score exceeds the threshold.
 11. The method of claim 1, wherein the nodes of each community are connected via edges with weights based on IBD estimates between the genotypes of the reference individuals.
 12. The method of claim 11, wherein the reference individuals and their corresponding nodes are grouped into the reference panels based on the edge weights between nodes.
 13. The method of claim 11, wherein an IBD estimate is an amount DNA overlapping between the genotype of one individual and the genotype of another individual.
 14. The method of claim 13, wherein an IBD estimate is a total amount of one or more chromosomes that is inherited from an ancestor that is common to the given individual and one of individuals in one of the reference panels.
 15. The method of claim 1, wherein comparing comprises: determining, for each community, amounts of DNA overlapping between the individual and the reference individuals of the reference panel associated with that community.
 16. The method of claim 15, wherein comparing further comprises: inputting the amounts of DNA overlap for one of the communities into a model associated with that community to generate a score for the community, the model comprising a set of features defined from amounts of DNA overlap between reference individuals in the reference panel of that community;
 17. The method of claim 16, wherein the features include a plurality of features defined as the number of connections between the individual and individuals in one of the reference panels within specified ranges of amounts of estimated IBD.
 18. The method of claim 17, wherein the features include separate features for each of the specified ranges for each of the different reference panels.
 19. The method of claim 1 wherein the reference individuals meet at least one of an age and a ethnicity filtering criteria.
 20. The method of claim 1 further comprising: generating an IBD network comprising the communities and associated reference panels by: generating a plurality of IBD estimates, each IBD estimate being between each of a pair of individuals in one of the reference panels; mapping the IBD estimates into edge weights: applying a network clustering algorithm to the network defined by these edge weights to identify two or more communities; and classifying the individuals to each community based on the IBD estimates.
 21. The method of claim 20 wherein mapping the IBD estimates into edge weights further comprises: choosing a target range of generations; simulating the distribution of estimated IBD corresponding to relationships in which the common ancestors fall within the target range of generations; and defining the mapping to more heavily weight IBD estimates associated with pairs of individuals with common ancestors who fall within the target range of generations.
 22. The method of claim 20 wherein the network clustering algorithm is implemented as a recursive application of a modularity-maximizing community detection method.
 23. The method of claim 20 further comprising: refining the reference panels by, for each of a plurality of the individuals in the reference panel: applying the network clustering algorithm a plurality of times; measuring a stability ranking of the individual by counting a number of times that the individual is assigned to a same community; and maintaining the individual in the reference panel if the stability ranking is greater than a threshold stability ranking.
 24. A computer system comprising a computer processor and a memory, the memory storing computer program instructions that when executed by the processor cause the processor to: obtain a DNA sample from an individual; determine the genotype of the individual based on the DNA sample; access, from a non-transitory computer readable storage medium of a computing device, a plurality of reference panels each associated with one of a plurality of different communities, each community comprising a plurality of nodes, each node corresponding to a reference genotype of a different reference individual; compare, with a computer processor associated with the computing device, the genotype against the reference panels to generate scores for the communities with respect to the genotype; identify one or more communities associated with the individual based on the scores; calculate, for each of the one or more communities, an ethnicity heterogeneity for a subset of members of the community, the ethnicity heterogeneity representing a measure of ancestral population diversity in the origin of DNA of the subset of the members of the community; and generate a report for the individual including the ethnicity heterogeneities of the one or more communities. 